package com.example.lp.lpuicore.paint;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.example.lp.lpuicore.R;
import com.example.lp.lpuicore.canvas.CircleView;
import com.example.lp.lpuicore.paint.model.BitmapRendering;
import com.example.lp.lpuicore.paint.model.CircleRendering;
import com.example.lp.lpuicore.paint.model.CombinedRendering;
import com.example.lp.lpuicore.paint.model.LinearRendering;
import com.example.lp.lpuicore.paint.model.ScannRendering;

/**
 * Paint练习
 * lp
 * 2019/7/17
 * */
public class PaintActivity extends AppCompatActivity  {
    private LinearLayout linearLayout;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_paint);
        initView();
    }


    private void initView() {
        linearLayout =findViewById(R.id.re_1);
        PaintView LinearView=new PaintView(this,new LinearRendering());
        PaintView bitmapView=new PaintView(this,new BitmapRendering());
        PaintView cireCleView=new PaintView(this,new CircleRendering());
        PaintView combinedView=new PaintView(this,new CombinedRendering());
        PaintView scanView=new PaintView(this,new ScannRendering());
        TextView name=new TextView(this);
        name.setText("LinearRendering:");
        TextView name1=new TextView(this);
        name1.setText("BitmapRendering:");
        TextView name2=new TextView(this);
        name2.setText("CircleRendering:");
        TextView name3=new TextView(this);
        name3.setText("CombinedRendering:");
        TextView name4=new TextView(this);
        name4.setText("ScannRendering:");
        linearLayout.addView(name);
        linearLayout.addView(LinearView);
        linearLayout.addView(name1);
        linearLayout.addView(bitmapView);
        linearLayout.addView(name2);
        linearLayout.addView(cireCleView);
        linearLayout.addView(name3);
        linearLayout.addView(combinedView);
        linearLayout.addView(name4);
        linearLayout.addView(scanView);


    }


}
